//
//  BBPictureCell.swift
//  BaoKanSwift
//
//  Created by uncle-R on 16/6/14.
//  Copyright © 2016年 uncle-R. All rights reserved.
//

import UIKit

class BBPictureCell: UITableViewCell {
    
    var pictureIMG = UIImageView()
    var title = UILabel()

    override func awakeFromNib() {
        super.awakeFromNib()
    }

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        prepareUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func prepareUI(){
        
        pictureIMG.frame = CGRectMake(0, 0,UI_SCREEN_WIDTH, 250)
        contentView.addSubview(pictureIMG)
        
        let bgView = UIView()
        bgView.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.3)
        print( contentView.frame.size.height)
        bgView.frame = CGRectMake(0,210, UI_SCREEN_WIDTH, 40)
        contentView.addSubview(bgView)
        
        title.frame = CGRectMake(0, 5, UI_SCREEN_WIDTH, 30)
        title.textAlignment = NSTextAlignment.Center
        title.textColor = UIColor.whiteColor()
        title.font = UIFont.systemFontOfSize(14.0)
        bgView.addSubview(title)
    }
    
}
